Silverlight.ua=null;

Silverlight.detectUserAgent=function()
{
  var a=window.navigator.userAgent;
  Silverlight.ua={OS:"Unsupported",Browser:"Unsupported"};
  if(a.indexOf("Windows NT")>=0)
    Silverlight.ua.OS="Windows";
  else if(a.indexOf("PPC Mac OS X")>=0)
    Silverlight.ua.OS="MacPPC";
  else if(a.indexOf("Intel Mac OS X")>=0)
    Silverlight.ua.OS="MacIntel";
  if(Silverlight.ua.OS!="Unsupported")
    if(a.indexOf("MSIE")>=0) {
      if(navigator.userAgent.indexOf("Win64")==-1)
        if(parseInt(a.split("MSIE")[1])>=6)
          Silverlight.ua.Browser="MSIE";
    }
    else if(a.indexOf("Firefox")>=0) {
      var b=a.split("Firefox/")[1].split("."),c=parseInt(b[0]);
      if(c>=2)
        Silverlight.ua.Browser="Firefox";
    else {
      var d=parseInt(b[1]);
      if(c==1&&d>=5)
        Silverlight.ua.Browser="Firefox";
      }
    }
    else if(a.indexOf("Safari")>=0)
      Silverlight.ua.Browser="Safari";
};
Silverlight.detectUserAgent();